package com.neuedu.shop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neuedu.shop.mapper.OrderMapper;
import com.neuedu.shop.pojo.Order;
import com.neuedu.shop.service.OrderService;

/**
 * @author ZhangHongRui
 *
 *         2020年1月10日
 */
@Service
@Transactional
public class OrderSeriveImpl implements OrderService {

	@Autowired
	private OrderMapper mapper;

	@Override
	public void insert(Order order) {
		mapper.insert(order);
	}

	@Override
	public List<Order> findAll() {
		// TODO Auto-generated method stub
		return mapper.findAll();
	}

	@Override
	public List<Order> findByUserid(Integer userid) {
		return mapper.findByUserid(userid);
	}

	@Override
	public Order commit(Integer userid) {
		return mapper.commit(userid);
	}

	@Override
	public List<Order> findByName(String name) {
		// TODO Auto-generated method stub
		return mapper.findByName(name);
	}

}
